﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;

namespace TestGame.GameUtil {
    class KeyUtilities {
        static Keys GetKeyFromString(String keyString) {
            if (keyString == "A") {
                return Keys.A;
            }
            else if (keyString == "B") {
                return Keys.B;
            }
            else if (keyString == "C") {
                return Keys.C;
            }
            else if (keyString == "D") {
                return Keys.D;
            }
            else if (keyString == "E") {
                return Keys.E;
            }
            else if (keyString == "F") {
                return Keys.F;
            }
            else if (keyString == "G") {
                return Keys.G;
            }
            else if (keyString == "H") {
                return Keys.H;
            }
            else if (keyString == "I") {
                return Keys.I;
            }
            else if (keyString == "J") {
                return Keys.J;
            }
            else if (keyString == "K") {
                return Keys.K;
            }
            else if (keyString == "L") {
                return Keys.L;
            }
            else if (keyString == "M") {
                return Keys.M;
            }
            else if (keyString == "N") {
                return Keys.N;
            }
            else if (keyString == "O") {
                return Keys.O;
            }
            else if (keyString == "P") {
                return Keys.P;
            }
            else if (keyString == "Q") {
                return Keys.Q;
            }
            else if (keyString == "R") {
                return Keys.R;
            }
            else if (keyString == "S") {
                return Keys.S;
            }
            else if (keyString == "T") {
                return Keys.T;
            }
            else if (keyString == "U") {
                return Keys.U;
            }
            else if (keyString == "V") {
                return Keys.V;
            }
            else if (keyString == "W") {
                return Keys.W;
            }
            else if (keyString == "X") {
                return Keys.X;
            }
            else if (keyString == "Y") {
                return Keys.Y;
            }
            else if (keyString == "Z") {
                return Keys.Y;
            }
            else if (keyString == "Space") {
                return Keys.Space;
            }
            else if (keyString == "LeftAlt") {
                return Keys.LeftAlt;
            }
            else if (keyString == "LeftShift") {
                return Keys.LeftShift;
            }
            else if (keyString == "LeftControl") {
                return Keys.LeftControl;
            }
            else if (keyString == "LeftWindows") {
                return Keys.LeftWindows;
            }
            else if (keyString == "Up") {
                return Keys.Up;
            }
            else if (keyString == "Down") {
                return Keys.Down;
            }
            else if (keyString == "Left") {
                return Keys.Left;
            }
            else if (keyString == "Right") {
                return Keys.Right;
            }
            else if (keyString == "RightAlt") {
                return Keys.RightAlt;
            }
            else if (keyString == "RightShift") {
                return Keys.RightShift;
            }
            else if (keyString == "RightControl") {
                return Keys.RightControl;
            }
            else if (keyString == "RightWindows") {
                return Keys.RightWindows;
            }
            else {
                return Keys.None;
            }
        }
    }
}
